
<div class="data-div">
		<div class="widget-header bordered-bottom bordered-themeprimary">
                <i class="widget-icon fa fa-tasks themeprimary"></i>
                <span class="widget-caption themeprimary">列表</span>
                <form  role="form" onsubmit="return false;" id="form_data_table_goods_list_1">
                	 <div class="widget-buttons">
                		   商品名称：<input type="text" name="title" style="width:120px;height:25px;margin-right:10px;padding: 3px;">
			         </div>     
			         <div class="widget-buttons">	  			
						   <button href="javascript:;" class="btn btn-blue btn-xs search"  data-title="查询" data-form="true" onclick="">查询</button>
					 </div>

					 <!--<div class="widget-buttons buttons-bordered">
						<button href="bar/add_page" class="btn btn-palegreen btn-xs" data-handler="MODAL" modal-size="800px" data-title="新建网吧">新建网吧</button>
					</div>-->

           </form>
		</div>
         
		<div class="widget no-header ">
			<div class="widget-body">
				<table class="table table-condensed table-bordered table-hover " id="data_table_goods_list_1">
				</table>
				
			</div>
		</div>
	<!-- END SAMPLE TABLE PORTLET-->
</div>

			
    

<script>
$(document).ready(function() {
 Select2Ex.handleForm4select2({target:$("#form_data_table_goods_list_1")});
   
  TableAjax.init('data_table_goods_list_1',{
	 sAjaxSource: "goods/list",
	 aaSorting: [   [ 6, "desc" ]  ], // 需要自定义
	 uxDataTitle:"null",
	 uxCheckable:false,
	 uxCloseScroll:true,
	 uxDrapable:false,
	 iDisplayLength:20,
	 aoColumns: [		
	 		{sTitle:'商品ID',  mData: "id"},
			{sTitle:'商品名称',  mData: "title"},
			{sTitle:'活动价格',  mData: "price",mRender:function(data,d,all){
				return (all.price/100).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
			}},
		 	{sTitle:'市场价格',  mData: "viewPrice",mRender:function(data,d,all){
		 		return (all.viewPrice/100).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, '$1,');
		 	}},
		 	{sTitle:'销量',  mData: "saleNum"},
			{sTitle:'添加时间',  mData: "insertTime",mRender:function(data,d,all){
				return all.insertTimeStr+'';
			}},
		    {sTitle:'更新时间',  mData: "updateTime",mRender:function(data,d,all){
				 return all.updateTimeStr+'';
			}},
			{sTitle:'操作',  mData: "id", mRender:function(data,d,all){ 
				var htm = '';
				htm +='<a style="margin:20px" data-handler="CONFIRM"  href="goods/go_top?id='+all.id+'">移到最前</a>';
			    htm +=' | <a style="margin:20px" data-handler="CONFIRM"  href="goods/del?id='+all.id+'">删除</a>';
				htm += '<a class="blue-stripes" style="margin:15px" data-title="价格修改" data-handler="MODAL" href="goods/price_mod_page?id='+all.id+'" modal-size="820px">修改价格</a>';
			    return htm;
			}	 		  		    
			}
        ]
 	});
 	
 	
  });
  
  
</script>